package cn.qlu.yhy.service;

import java.util.List;

import cn.qlu.yhy.model.User;
import cn.qlu.yhy.model.enumpack.Role;

public interface IUserService {

    // user login
    public User login(String username, String password);

    //
    public boolean deleteUser(User user);

    public boolean createUser(User user);

    public boolean updateUser(User user);

    // get user by user id
    public User getUserByUserId(int userId);

    // get user by username
    public User getUserByName(String userName);

    // get user by nickname
    public User getUserByNickname(String nickname);

    // judge user is exist by username
    public boolean getUserExistByUserName(String userName);

    // judge user is exist by nickname
    public boolean getUserExistByNickname(String nickname);

    // find all user
    public List<User> findUsers();

    // find user by role
    public List<User> findUsersByRole(Role role);

}
